/**
 * @file store 模块索引文件
 * @description 用于统一导出所有的模块的状态管理
 */

import { createPinia } from 'pinia'
import { createPersistedState } from 'pinia-plugin-persistedstate'

const pinia = createPinia()

pinia.use(
  createPersistedState({
    storage: {
      getItem: uni.getStorageSync,
      setItem: uni.setStorageSync,
    },
  }),
)

export default pinia

export * from './modules/counter'
export * from './modules/token'
export * from './modules/user'
